Generally speaking, legacy applications include functionality that has been developed, tested, and/or improved over time. Such functionality is often completely integrated with a user interface. Although a legacy application may become outdated for one or more reason, it often implements or otherwise includes functionality that is still useful. Therefore, in order to reuse the existing functionality of a legacy application, a new application may need to be built on top of the legacy application's user interface.
System environments where this approach is needed usually comprises a frontend, a backend, and a controller. The backend may incorporate one or more legacy applications. The legacy application is any application whose existing functionality is being reused by a new application. The new application is any application that is reusing existing functionality of a different application. A controller facilitates communication between the legacy and the new application. The controller may be a separate application or part of the new application. The frontend comprises a user interface of the new application. A user enters input into the frontend. The input comprises of a trigger action and input data. The trigger action is a command that the user wants to execute. The controller maps the input to a set of commands enriched with input data. The set of commands enriched with input data is called an action script. The controller executes the action script at the backend to execute the command that the user wants to execute.
One approach for reusing existing functionality of a legacy application is to build a new application on top of the legacy application's user interface. Communication between the new application and the legacy application is realized by using stateless control of the backend (legacy application). Stateless control is when the legacy application is launched before the controller executes any action scripts at the backend. In other words, the backend is not kept running after an action script is executed at the backend and before a new action script is executed. However, a drawback of this approach is that stateless control forces the re-execution of all the action scripts generated up until that point every time an input is entered at the frontend that requires the functionality of the backend. Such repetition worsens performance with each user interaction that requires the functionality of a legacy application. Performance is further negatively affected if there is a costly initial load that needs to be multiply repeated.
An alternative approach for reusing existing functionality of a legacy application is to build a new application on top of the legacy application's user interface where the communication between the new application and the legacy application is realized by using stateful control of the backend. Stateful control is when the backend is kept running after it is launched the first time (after the execution of the first action script on the backend). A drawback of this approach is that simple implementation of features like undo/redo becomes much more complicated. Another drawback of this approach is that the system load can not be released, when the functionality of the backend is not being used, by dismissing the backend.
In view of the foregoing, there is a need for an improved solution for reusing the functionality of legacy applications. In particular, there is a need for systems and methods for ambistateful control, where the functionality of one or more legacy applications can be used in a new application. Specifically, improved solutions need to allow the new application to use the functionality of a legacy application without having to re-execute the entire action history in the backend upon each action executed in the frontend. At the same time, the solution needs to provide the ability to dismiss the backend even if it might be used later, if appropriate.